package com.project.server.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.server.entity.Consultation;
import com.project.server.vo.ConsultationDetailVO;
import com.project.server.vo.ConsultationStats;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.IService;
import com.project.server.dto.ConsultationStatsDTO;
import com.project.server.vo.ConsultationVO;


public interface ConsultationService extends IService<Consultation> {


    Long createConsultation(Long doctorId,Long userId);
    ConsultationDetailVO getConsultationDetail(Long id);
    @Transactional

    Page<Consultation> getConsultations(Long doctorId, Integer current, Integer size, Integer status);

    @Transactional
    void acceptConsultation(Long consultationId);

    void rejectConsultation(Long id);

    void endConsultation(Long id, String remark);


    ConsultationStats getConsultationStats(Long doctorId);

    // 获取医生问诊统计
    ConsultationStatsDTO getDoctorStats(Long doctorId);

    // 获取医生问诊列表
    Page<Consultation> getDoctorConsultations(Long doctorId, Integer status, Integer current, Integer size);

    // 更新医生在线状态
    void updateDoctorOnlineStatus(Long doctorId, Boolean online);

    // 获取用户问诊记录
    Page<ConsultationVO> getUserConsultations(Long userId, Integer status, Integer current, Integer size);
}
